package it.etoken.component.eosblock.dao.mapper;

import it.etoken.base.model.eosblock.entity.Delegatebw;
import it.etoken.base.model.eosblock.entity.DelegatebwExample;
import it.etoken.component.eosblock.dao.provider.DelegatebwSqlProvider;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
@Mapper
public interface DelegatebwMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @SelectProvider(type=DelegatebwSqlProvider.class, method="countByExample")
    long countByExample(DelegatebwExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @DeleteProvider(type=DelegatebwSqlProvider.class, method="deleteByExample")
    int deleteByExample(DelegatebwExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @Delete({
        "delete from delegatebw",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @Insert({
        "insert into delegatebw (id, account_name, ",
        "status, cpu, net)",
        "values (#{id,jdbcType=BIGINT}, #{accountName,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=BIGINT}, #{cpu,jdbcType=VARCHAR}, #{net,jdbcType=VARCHAR})"
    })
    int insert(Delegatebw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @InsertProvider(type=DelegatebwSqlProvider.class, method="insertSelective")
    int insertSelective(Delegatebw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @SelectProvider(type=DelegatebwSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="account_name", property="accountName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.BIGINT),
        @Result(column="cpu", property="cpu", jdbcType=JdbcType.VARCHAR),
        @Result(column="net", property="net", jdbcType=JdbcType.VARCHAR)
    })
    List<Delegatebw> selectByExample(DelegatebwExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @Select({
        "select",
        "id, account_name, status, cpu, net",
        "from delegatebw",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="account_name", property="accountName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.BIGINT),
        @Result(column="cpu", property="cpu", jdbcType=JdbcType.VARCHAR),
        @Result(column="net", property="net", jdbcType=JdbcType.VARCHAR)
    })
    Delegatebw selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @UpdateProvider(type=DelegatebwSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Delegatebw record, @Param("example") DelegatebwExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @UpdateProvider(type=DelegatebwSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Delegatebw record, @Param("example") DelegatebwExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @UpdateProvider(type=DelegatebwSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Delegatebw record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table delegatebw
     *
     * @mbg.generated Tue Aug 14 17:25:29 CST 2018
     */
    @Update({
        "update delegatebw",
        "set account_name = #{accountName,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=BIGINT},",
          "cpu = #{cpu,jdbcType=VARCHAR},",
          "net = #{net,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(Delegatebw record);
}